import React, { Component } from "react";
import { Button } from 'antd'
import HocButton from "./HocButton";
class CommButton extends Component {

  render() {
    const { danger, type, disabled, handlerClick, buttonName } = this.props;
    return (
      <Button danger={danger} type={type} disabled={disabled} onClick={handlerClick}>{buttonName}</Button>
    )
  }
}

// export default CommButton
// 直接调用高级组件，并返回一个新组件，最后公开的是新组件。
export default HocButton(CommButton)